package org.neuedu.chapter06_0621.practice02;

public class Rectangle {
    int width;
    int length;

    public int getArea() {
        return width * length;
    }

    public int getPer() {
        return (width + length) * 2;
    }

    public void showAll() {
        System.out.println("长: "+length);
        System.out.println("宽: " + width);
        int area = getArea();
        System.out.println("面积: " + area);
        int per = getPer();
        System.out.println("周长: " + per);
    }
}
